home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
comm
/
bgdial11.zip
/
dial.doc
next >
Wrap
Text File
|
1991-03-04
|
8KB
|
201 lines
Name
dial
Purpose
To repeatedly dial a list of telephone numbers until one of
them answers by issuing commands for hayes-modems. The dial
process is executed in 'background' so that the user can use
other programs while waiting for the dial to complete.
Syntax
dial [-i<initstr>][-k<comb>][-w<secs>][-b<secs>]
<port> <speed><parity><data><stop> <tel> [tel]..
dial -q
Parameters
<port> is the com port number on which the modem is attached. Ports
from 1 to 4 are supported.
<speed><parity><data><stop> specifies the communication parameters
as follows :
<speed> : communication speed (bps). Legal values are 300, 1200
2400, 4800, 9600, 14400, 19200 and 38400.
<parity> : parity, one of N (none), O (odd), E (even)
<data> : number of data bits (7 or 8)
<stop> : number of stop bits (1 or 2)
<tel> [tel] .. specifies the numbers to call. Since dial 'glues'
the telephone numbers directly to the ATD command, all the dial
modifiers (such as 'P' for pulse dial or 'T' for tone dial) can
be used here.
Options
The options can be preceeded by either the '-' character
or the ms-dos default '/' character. They may appear in
any order, but always before the arguments.
The options are :
-i : Specify an initialization string fed to the modem
before issuing first dial command. The string is
fed to the modem 'as is', so the AT-prefix must
preceede a command here. Refer to your modem's
manual for information about the commands.
-k : Specify an abort key combination. When these keys
are held down for about one second, a beep is emitted
from the pc speaker and dial is aborted.
<comb> is made up of r, l, c and a, where :
r : right shift
l : left shift
c : ctrl
a : alt
A valid combination must contain at least two keys.
By default there is no abort key combination, because
such a combination might interfere with the use of
other programs.
-w : Specify a 'hard' wait time of the lenght of <secs>
seconds. After this time has passed since issuing
the dial command the dial proceeds to the next number.
Otherwize, whatever message from the modem (such as
'BUSY') causes dial to proceed to the next number.
By default this wait time is 30 seconds. The maximum
for this time is 300 seconds.
-b : Specify a wait time between dials of the length of
<secs> seconds. This is useful, if you'd like to
give a change to someone calling to you to get
trough while dial is running. By default there is
no wait time between calls (except that for technical
reasons). The maximum for this time is 300 seconds.
If a wait time between the calls is specifed, dial
is aborted if the result code 'RING' is sent by
the modem while waiting. The abortion is signaled
by a beep emitted from the pc speaker.
-q : Abort a previously started dial. A beep is emitted
from the pc speaker as aborting.
Comments
Dial issues hayes dial commands to the modem, until one of the
numbers in the list answers causing a string starting with
'CONNECT' to be sent from the modem. Dial can also be terminated
by user request (dial -q or a hotkey sequence) during the dial.
At this point, dial releases all the memory reserved by it and
restores the captured interrupt vectors essential for the
background operation. At the time dial is assumed to be terminated
successfully, a series of beebs is emitted from the pc speaker.
In case of premature termination a single beep is emitted instead.
Before the actual dialing starts, an initialization string is
fed to the modem (if one is specified). After this, the modem
is fed the commands needed to turn echo from the modem off and
to get word response codes.
The following table lists the assumed io base addresses and
interrupts for each port :
port io base (hex.) interrupt (hex.)
1 3f8h 0ch (std.)
2 2f8h 0bh (std.)
3 3e8h 0ch (may vary)
4 2e8h 0bh (may vary)
Dial does not have a possibility to store certain sets of
numbers and settings permanently in files, but this can
be accomplished by writing the dial command itself as a
.bat -file.
Examples
dial 2 1200N81 12345 67890 13579
Repeatedly dial numbers 12345, 67890 and 13579 using com2 at
1200 bps, no parity, 8 data bits, 1 stop bit.
dial 2 1200N81 t12345 t67890 t13579
As above, but enforce tone dialing for all numbers.
dial -w45 -b60 -klca 2 2400E71 12345 67890
Repeatedly dial numbers 12345 and 67890 using com2 at
2400 bps, no parity, 7 data bits, 1 stop bit. Wait
up to 45 seconds for carrier. Be idle 60 seconds
after each number. Abort, if users keeps left shift-,
ctrl- and alt-keys depressed for about a second.
dial -iATM0 3 9600N81 12345 13579
Repeatedly dial numbers 12345 and 13579 using com3 at
9600 bps, no parity, 8 data bits, 1 stop bit. Issue
hayes 'speaker off' -command before starting to dial.
Return value
If successfully started, dial returns 0 and remains resident
in the memory. In other case 1 is returned to signal failure
(e.g. missing arguments or dial already running).
Bugs and caveats
Actually, there is no such thing as multitasking in the plain
MS-DOS environment. Therefore, this program may not work with
all configurations or with all programs. (Once again) this TSR
is required to be loaded as the last one to ensure proper
'unloading' and operation.
In case some other program has blocked the int 0x28, even a
terminated dial may still be resident in memory, causing
dial to fail if re-executed. In this case, run dial as 'dial
-q'. This always generates an int 0x28, thus providing the
resident dial a change to terminate.
The program may not work at the higher communication speeds.
It has been reported to work at speeds up to 9600 bps. Even
higher speeds are provided, however, because there is no
known reason why they certainly wouldn't work.
The wait time specified by the -w option has no effect if it
is longer than that the modem itself will wait for a call to
complete. Use the -i option to set the modem's wait time if
needed.
-----------------------------------------------------------------------------
Dial.exe was written using Borland's Turbo C by Jouni Leppäjärvi (C) 1990, 1991
(jml@stekt.oulu.fi). It and the documentation provided with it may be used
and copied freely on a non-commercial basis. The program and the documentation
are provided 'as is' with no warranty of any kind. Comments and bug reports
are wellcome. (v 1.1, March 4, 1991)
-----------------------------------------------------------------------------